<?php
//var_dump($payment_value);
?>
<div id="view_payment_mode" class="reveal-modal">
	<p><strong>Payment Plan Calendar</strong></p>
	<hr class="clearfix">

	<table class="table">
		<?php if($student_payment_schedule): ?>
			<tbody>
				<thead>
					<td>Month</td>
					<td style="text-align:right;">Tuition</td>
					<td style="text-align:right;">Matriculation</td>
					<td style="text-align:right;">Miscellaneous + Others</td>
					<td style="text-align:right;">Total</td>
				</thead>
				
				<?php foreach($student_payment_schedule as $v): ?>
						<?php
						if($v->sps_month=='Registration'){
						?>
						<tr>
							<td><?=$v->sps_month;?></td>
							<td  style="text-align:right;"><?=number_format($v->sps_tuition,2,'.',',');?></td>
							<td  style="text-align:right;"><?=number_format($v->sps_matri,2,'.',',');?></td>
							<td  style="text-align:right;"><?=number_format(($misc_fees_for_modal+$other_fees_for_modal),2,'.',',');?></td>
							<td  style="text-align:right;"><?=number_format(($v->sps_tuition+$v->sps_matri)+($misc_fees_for_modal+$other_fees_for_modal),2,'.',',');?></td>
						</tr>
						<?php
						}else{
						?>
						<tr>
							<td><?=$v->sps_month;?></td>
							<td  style="text-align:right;"><?=number_format($v->sps_tuition,2,'.',',');?></td>
							<td  style="text-align:right;"><?=number_format($v->sps_matri,2,'.',',');?></td>
							<td>&nbsp;</td>
							<td  style="text-align:right;"><?=number_format($v->sps_tuition+$v->sps_matri,2,'.',',');?></td>
						</tr>
						<?php
						}
						?>
				<?php endforeach; ?>
			</tbody>
		<?php endif; ?>
	</table>

	<hr class="clearfix">
	<?php
	if($payment_value->payment_mode!='cash basis'){
	?>
	<p style="text-align:right;"><a href="<?=site_url('pdf/print_scedule_installment_plan/'.$id)?>" target="_blank" class="btn">Print Schedule Of Installment Plan Due Dates</a></p>
	<?php
	}
	?>

	<a class="close-reveal-modal">x</a>
</div>